<template>
    <!-- 组件的结构 -->
    <div class="demo">
        <h2>学校名称：{{schoolName | mySlice}}</h2>
        <h2>学校地址：{{address}}</h2>
        <button @click="hello">测试一个hello方法</button>
    </div>
</template>

<script>
    export default{
            name:'School-test',
            data(){
            return {
                schoolName:'黑马程序员abc',
                address:'大连'
            }
            }
            }
</script>

<style>
    /* 组件的样式 */
    .demo{
        color: red;
    }
</style>